﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NQueenPuzzle
{
    public static class RandomNumberGenerator
    {
        private static Random _random = new Random(0);

        //private static readonly object syncLock = new object();

        //Default value set for the Maximum limit for Random number generated 
        private const int DefaultMaximumValue = 10000;

        //Returns a random number. Declared private as it is only used within the class
        public static int GetRandomNumber(int maximumValue)
        {
            int[] arr = new int[maximumValue+1];
            
            //lock (syncLock)
            //{
            int j = 0;
            for (int i = 0; i <= maximumValue; i++)
            {
                arr[j] = _random.Next(maximumValue);
                
                j++;

            }

                return _random.Next(maximumValue);
            //}
        }
    }
}
